#ifndef SHADER_H
#define SHADER_H

#include "glad/glad.h"
#include <string>

class Shader {
public:
  Shader(const char *vertPath, const char *fragPath);
  ~Shader();

  void begin();
  void end();

  void setFloat(const std::string &name, float value);
  void setVector3(const std::string &name, float x, float y, float z);
  void setVector3(const std::string &name, const float *values);
  void setInt(const std::string &name, int value);

private:
  GLuint mProgram{0};

  std::string readShaderFile(const char *filePath);
  GLuint compileShader(std::string shaderSrc, GLenum shaderType);
};

#endif // SHADER_H
